<div class="page-header">
    <h5 class="content-title"><%= __('account.management') %></h5>
    <div class="pull-left">
        <ul class="fl">
            <li>
                <button class="btn btn-block btn-info newAccount"><i class="fui-plus-circle icon-menu"></i></i>
                    <span><%= __('account.establishAccount') %></span>
                </button>
            </li>
            <li>
                <button class="btn btn-block btn-success restPwd"><i class="fa fa-key icon_menu"></i><span><%= __('account.password') %></span>
                </button>
            </li>
            <li>
                <button class="btn btn-block all-btn-lock"><i class="fa fa-lock icon_menu"></i><span><%= __('account.lockAll') %></span>
                </button>
            </li>
            <li>
                <button class="btn btn-block all-btn-unlock"><i class="fa fa-unlock icon_menu"></i><span><%= __('account.unlockAll') %></span>
                </button>
            </li>
        </ul>
    </div>
</div>
<div class="queryCondition">
    <form class="query-form">
        <input type="hidden" id="_loginVendorId" value="<%= session.userData.vendorId%>" />
        <input type="hidden" id="_loginCustomerId" value="<%= session.userData.customerId%>" />
        <input type="hidden" id="_loginAccountId" value="<%= session.userData.userId%>" />
        <div class="row">
            <div class="col-md-3">
                <label><%= __('account.accountName') %>：</label>
                <input type="text" name="name_like" placeholder="<%= __('account.fuzzySearchByName') %>">
            </div>
            <div class="col-md-3">
                <label><%= __('account.accountCode') %>：</label>
                <input type="text" name="code_like" placeholder="<%= __('account.fuzzySearchByCode') %>">
            </div>
            <div class="col-md-3">
                <label><%= __('account.cellphoneNumber') %>：</label>
                <input type="text" name="mobile_like" placeholder="<%= __('account.fuzzySearchByCellphone') %>">
            </div>
        </div>
        <div class="row">
            <div class="col-md-3">
                <label><%= __('account.organizationCode') %>：</label>
                <input type="text" name="organization_code_obj_ae" placeholder="<%= __('account.preciseSearch') %>">
            </div>
            <div class="col-md-3">
                <label><%= __('account.accountStatus') %>：</label>
                <select name="status" style="width: 60%;">
                    <option value="">--<%= __('account.pleaseSelect') %>--</option>
                    <option value="1"><%= __('account.startUse') %></option>
                    <option value="0"><%= __('account.forbiddenedUse') %></option>
                </select>
            </div>
        </div>
        <div class="row">
            <div class="col-md-2">
                <button type="button" class="btn btn-sm btn-inverse btn-query"><%= __('account.search') %></button>
            </div>
        </div>
    </form>
</div>


<div class="dolphin-col-24 main" id="myContent">
    <div class="panel panel-primary box">
        <div class="panel-heading box-title">
            <h3 class="panel-title">
                <i class="fa fa-table fa-lg" aria-hidden="true"></i>
                <%= __('account.accountsList') %>
            </h3>
            <input id="accountType" type="hidden" value="<%=session.userData.accountType%>"/>
            <div class="actions">
                <a class="btn btn-mini content-refresh" href="#">
                    <i class="fa fa-refresh"></i>
                </a>
            </div>
        </div>
        <div id="userList" class="box-content"></div>
    </div>
</div>

<div class="modal" id="account_win">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <span class="modal-title"><%= __('account.management') %></span>
            </div>
            <div class="modal-body">
                <div class="tab-pane">
                    <form class="form-horizontal edit-form">
                        <input type="hidden" class="form-control" name="id">
                        <input type="hidden" name="type" value="1">
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('account.accountName') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="name" type="text" dol-validate="required">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('account.accountCode') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="code" type="text" dol-validate="required">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('account.accountType') %></label>
                            <div class="col-md-6">
                                <select class="form-control" name="type" dol-validate="required" id="acctType">
                                    <option value="1"><%= __('frameworkType.admin') %></option>
                                    <option value="2"><%= __('frameworkType.client') %></option>
                                    <option value="3"><%= __('frameworkType.channelDistributor') %></option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group hidden cusCate cusId">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('account.affiliatedCustomer') %></label>
                            <div class="col-md-6">
                                <!--<select id="customerSelect" class="form-control"-->
                                        <!--options ajaxType="post" codeField="id" nameField="name" name="customer.id"></select>-->

                                <select id="customerSelect" name="customer.id"></select>
                            </div>
                        </div>
                        <div class="form-group hidden cusCate chanId">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('frameworkType.channelDistributor') %></label>
                            <div class="col-md-6">
                                <select class="form-control"
                                        options
                                        optionUrl="/api/c477f55806ed4b3f934c3a21f8788dde"
                                        ajaxType="post"
                                        optionParam=''
                                        codeField="id" nameField="name" name="vendor.id"></select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('account.cellphoneNumber') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="mobile" type="text" dol-validate="required">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('account.email') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="email" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('account.gender') %></label>
                            <div class="col-md-6">
                                <select class="form-control" name="sex">
                                    <option value=""></option>
                                    <option value="1"><%= __('account.male') %></option>
                                    <option value="2"><%= __('account.female') %></option>
                                </select>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary btn_submit"><%= __('account.save') %></button>
                <button type="button" class="btn btn-default" data-dismiss="modal"><%= __('account.delete') %></button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<script src="<%= global.config.publicPath %>/page/scripts/<%= path %>.js"></script>